.class public Lcom/TwinBlade/PicturePassword/AService;
.super Landroid/app/Service;
.source "SourceFile"

# interfaces
.implements Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;


# static fields
.field public static final a:Landroid/content/BroadcastReceiver;

.field private static d:Landroid/content/Context;


# instance fields
.field private b:Landroid/app/KeyguardManager$KeyguardLock;

.field private c:Landroid/content/SharedPreferences;

.field private e:Landroid/app/AlarmManager;

.field private f:Landroid/app/PendingIntent;

.field private g:Z

.field private h:Z

.field private i:Z

.field private j:J

.field private k:Z

.field private l:Z

.field private final m:Landroid/content/BroadcastReceiver;

.field private final n:Landroid/telephony/PhoneStateListener;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 299
    new-instance v0, Lcom/TwinBlade/PicturePassword/c;

    invoke-direct {v0}, Lcom/TwinBlade/PicturePassword/c;-><init>()V

    sput-object v0, Lcom/TwinBlade/PicturePassword/AService;->a:Landroid/content/BroadcastReceiver;

    .line 308
    return-void
.end method

.method public constructor <init>()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 33
    invoke-direct {p0}, Landroid/app/Service;-><init>()V

    .line 47
    iput-boolean v2, p0, Lcom/TwinBlade/PicturePassword/AService;->g:Z

    .line 48
    iput-boolean v2, p0, Lcom/TwinBlade/PicturePassword/AService;->h:Z

    .line 49
    iput-boolean v2, p0, Lcom/TwinBlade/PicturePassword/AService;->i:Z

    .line 50
    const-wide/16 v0, 0x0

    iput-wide v0, p0, Lcom/TwinBlade/PicturePassword/AService;->j:J

    .line 51
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/TwinBlade/PicturePassword/AService;->k:Z

    .line 52
    iput-boolean v2, p0, Lcom/TwinBlade/PicturePassword/AService;->l:Z

    .line 137
    new-instance v0, Lcom/TwinBlade/PicturePassword/a;

    invoke-direct {v0, p0}, Lcom/TwinBlade/PicturePassword/a;-><init>(Lcom/TwinBlade/PicturePassword/AService;)V

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->m:Landroid/content/BroadcastReceiver;

    .line 279
    new-instance v0, Lcom/TwinBlade/PicturePassword/b;

    invoke-direct {v0, p0}, Lcom/TwinBlade/PicturePassword/b;-><init>(Lcom/TwinBlade/PicturePassword/AService;)V

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->n:Landroid/telephony/PhoneStateListener;

    .line 33
    return-void
.end method

.method static synthetic a()Landroid/content/Context;
    .locals 1

    .prologue
    .line 43
    sget-object v0, Lcom/TwinBlade/PicturePassword/AService;->d:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/AService;)Landroid/content/SharedPreferences;
    .locals 1
    .parameter

    .prologue
    .line 42
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->c:Landroid/content/SharedPreferences;

    return-object v0
.end method

.method private a(I)V
    .locals 6
    .parameter

    .prologue
    const/4 v5, 0x1

    const/4 v4, 0x0

    .line 330
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->c:Landroid/content/SharedPreferences;

    const-string v1, "StockLockDuringDelay"

    invoke-interface {v0, v1, v5}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v0

    if-nez v0, :cond_0

    .line 331
    const-string v0, "keyguard"

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/AService;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/KeyguardManager;

    .line 332
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/AService;->b:Landroid/app/KeyguardManager$KeyguardLock;

    if-nez v1, :cond_0

    .line 333
    invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Class;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/app/KeyguardManager;->newKeyguardLock(Ljava/lang/String;)Landroid/app/KeyguardManager$KeyguardLock;

    move-result-object v0

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->b:Landroid/app/KeyguardManager$KeyguardLock;

    .line 334
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->b:Landroid/app/KeyguardManager$KeyguardLock;

    invoke-virtual {v0}, Landroid/app/KeyguardManager$KeyguardLock;->disableKeyguard()V

    .line 338
    :cond_0
    const-string v0, "alarm"

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/AService;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/AlarmManager;

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->e:Landroid/app/AlarmManager;

    .line 339
    new-instance v0, Landroid/content/Intent;

    const-string v1, "StartLockscreenDelayed"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 340
    sget-object v1, Lcom/TwinBlade/PicturePassword/AService;->d:Landroid/content/Context;

    const/high16 v2, 0x1000

    invoke-static {v1, v4, v0, v2}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v0

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->f:Landroid/app/PendingIntent;

    .line 342
    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v0

    .line 343
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v1

    invoke-virtual {v0, v1, v2}, Ljava/util/Calendar;->setTimeInMillis(J)V

    .line 344
    const/16 v1, 0xd

    invoke-virtual {v0, v1, p1}, Ljava/util/Calendar;->add(II)V

    .line 346
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/AService;->e:Landroid/app/AlarmManager;

    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v2

    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->f:Landroid/app/PendingIntent;

    invoke-virtual {v1, v4, v2, v3, v0}, Landroid/app/AlarmManager;->set(IJLandroid/app/PendingIntent;)V

    .line 347
    iput-boolean v5, p0, Lcom/TwinBlade/PicturePassword/AService;->g:Z

    .line 348
    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/AService;I)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 328
    invoke-direct {p0, p1}, Lcom/TwinBlade/PicturePassword/AService;->a(I)V

    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/AService;J)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 50
    iput-wide p1, p0, Lcom/TwinBlade/PicturePassword/AService;->j:J

    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/AService;Landroid/app/KeyguardManager$KeyguardLock;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 41
    iput-object p1, p0, Lcom/TwinBlade/PicturePassword/AService;->b:Landroid/app/KeyguardManager$KeyguardLock;

    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/AService;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 51
    iput-boolean p1, p0, Lcom/TwinBlade/PicturePassword/AService;->k:Z

    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/AService;ZLjava/lang/String;)V
    .locals 0
    .parameter
    .parameter
    .parameter

    .prologue
    .line 350
    invoke-direct {p0, p1, p2}, Lcom/TwinBlade/PicturePassword/AService;->a(ZLjava/lang/String;)V

    return-void
.end method

.method private a(ZLjava/lang/String;)V
    .locals 3
    .parameter
    .parameter

    .prologue
    const/4 v2, 0x0

    .line 351
    iput-boolean v2, p0, Lcom/TwinBlade/PicturePassword/AService;->g:Z

    .line 353
    invoke-static {}, Lcom/TwinBlade/PicturePassword/bl;->a()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 368
    :goto_0
    return-void

    .line 357
    :cond_0
    invoke-static {}, Lcom/TwinBlade/PicturePassword/bl;->b()Z

    move-result v0

    if-nez v0, :cond_2

    .line 358
    sget-object v0, Lcom/TwinBlade/PicturePassword/AService;->d:Landroid/content/Context;

    const/4 v1, 0x1

    invoke-static {v0, v1}, Lcom/TwinBlade/PicturePassword/bl;->a(Landroid/content/Context;Z)Lcom/TwinBlade/PicturePassword/bl;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/TwinBlade/PicturePassword/bl;->b(Z)V

    .line 363
    :goto_1
    invoke-static {}, Lcom/TwinBlade/PicturePassword/bl;->b()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->c:Landroid/content/SharedPreferences;

    const-string v1, "UpdateTimeBackground"

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 364
    sget-object v0, Lcom/TwinBlade/PicturePassword/AService;->d:Landroid/content/Context;

    invoke-static {v0, v2}, Lcom/TwinBlade/PicturePassword/bl;->a(Landroid/content/Context;Z)Lcom/TwinBlade/PicturePassword/bl;

    move-result-object v0

    invoke-virtual {v0, v2}, Lcom/TwinBlade/PicturePassword/bl;->a(Z)V

    .line 367
    :cond_1
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "Service Start Lock w/ Source: "

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/TwinBlade/PicturePassword/Utilities;->a(Ljava/lang/String;)V

    goto :goto_0

    .line 360
    :cond_2
    sget-object v0, Lcom/TwinBlade/PicturePassword/AService;->d:Landroid/content/Context;

    invoke-static {v0, v2}, Lcom/TwinBlade/PicturePassword/bl;->a(Landroid/content/Context;Z)Lcom/TwinBlade/PicturePassword/bl;

    move-result-object v0

    invoke-virtual {v0, v2}, Lcom/TwinBlade/PicturePassword/bl;->e(Z)V

    goto :goto_1
.end method

.method static synthetic b(Lcom/TwinBlade/PicturePassword/AService;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 47
    iput-boolean p1, p0, Lcom/TwinBlade/PicturePassword/AService;->g:Z

    return-void
.end method

.method private b()Z
    .locals 3

    .prologue
    const/4 v1, 0x1

    .line 311
    sget-object v0, Lcom/TwinBlade/PicturePassword/AService;->d:Landroid/content/Context;

    const-string v2, "window"

    invoke-virtual {v0, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/WindowManager;

    .line 312
    invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v0

    .line 313
    invoke-virtual {v0}, Landroid/view/Display;->getRotation()I

    move-result v0

    .line 315
    if-eq v0, v1, :cond_0

    const/4 v2, 0x3

    if-eq v0, v2, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    move v0, v1

    goto :goto_0
.end method

.method static synthetic b(Lcom/TwinBlade/PicturePassword/AService;)Z
    .locals 1
    .parameter

    .prologue
    .line 48
    iget-boolean v0, p0, Lcom/TwinBlade/PicturePassword/AService;->h:Z

    return v0
.end method

.method static synthetic c(Lcom/TwinBlade/PicturePassword/AService;)J
    .locals 2
    .parameter

    .prologue
    .line 50
    iget-wide v0, p0, Lcom/TwinBlade/PicturePassword/AService;->j:J

    return-wide v0
.end method

.method static synthetic c(Lcom/TwinBlade/PicturePassword/AService;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 52
    iput-boolean p1, p0, Lcom/TwinBlade/PicturePassword/AService;->l:Z

    return-void
.end method

.method private c()Z
    .locals 3
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "InlinedApi"
        }
    .end annotation

    .prologue
    const/4 v0, 0x0

    .line 320
    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0x9

    if-ge v1, v2, :cond_1

    .line 325
    :cond_0
    :goto_0
    return v0

    .line 324
    :cond_1
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/AService;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v1

    iget v1, v1, Landroid/content/res/Configuration;->screenLayout:I

    and-int/lit8 v1, v1, 0xf

    .line 325
    const/4 v2, 0x4

    if-ne v1, v2, :cond_0

    const/4 v0, 0x1

    goto :goto_0
.end method

.method static synthetic d(Lcom/TwinBlade/PicturePassword/AService;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 49
    iput-boolean p1, p0, Lcom/TwinBlade/PicturePassword/AService;->i:Z

    return-void
.end method

.method static synthetic d(Lcom/TwinBlade/PicturePassword/AService;)Z
    .locals 1
    .parameter

    .prologue
    .line 51
    iget-boolean v0, p0, Lcom/TwinBlade/PicturePassword/AService;->k:Z

    return v0
.end method

.method static synthetic e(Lcom/TwinBlade/PicturePassword/AService;)Z
    .locals 1
    .parameter

    .prologue
    .line 49
    iget-boolean v0, p0, Lcom/TwinBlade/PicturePassword/AService;->i:Z

    return v0
.end method

.method static synthetic f(Lcom/TwinBlade/PicturePassword/AService;)Landroid/app/AlarmManager;
    .locals 1
    .parameter

    .prologue
    .line 44
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->e:Landroid/app/AlarmManager;

    return-object v0
.end method

.method static synthetic g(Lcom/TwinBlade/PicturePassword/AService;)Landroid/app/PendingIntent;
    .locals 1
    .parameter

    .prologue
    .line 45
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->f:Landroid/app/PendingIntent;

    return-object v0
.end method

.method static synthetic h(Lcom/TwinBlade/PicturePassword/AService;)Z
    .locals 1
    .parameter

    .prologue
    .line 47
    iget-boolean v0, p0, Lcom/TwinBlade/PicturePassword/AService;->g:Z

    return v0
.end method

.method static synthetic i(Lcom/TwinBlade/PicturePassword/AService;)Z
    .locals 1
    .parameter

    .prologue
    .line 319
    invoke-direct {p0}, Lcom/TwinBlade/PicturePassword/AService;->c()Z

    move-result v0

    return v0
.end method

.method static synthetic j(Lcom/TwinBlade/PicturePassword/AService;)Z
    .locals 1
    .parameter

    .prologue
    .line 310
    invoke-direct {p0}, Lcom/TwinBlade/PicturePassword/AService;->b()Z

    move-result v0

    return v0
.end method

.method static synthetic k(Lcom/TwinBlade/PicturePassword/AService;)Landroid/app/KeyguardManager$KeyguardLock;
    .locals 1
    .parameter

    .prologue
    .line 41
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->b:Landroid/app/KeyguardManager$KeyguardLock;

    return-object v0
.end method

.method static synthetic l(Lcom/TwinBlade/PicturePassword/AService;)Z
    .locals 1
    .parameter

    .prologue
    .line 52
    iget-boolean v0, p0, Lcom/TwinBlade/PicturePassword/AService;->l:Z

    return v0
.end method


# virtual methods
.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder;
    .locals 1
    .parameter

    .prologue
    .line 119
    const/4 v0, 0x0

    return-object v0
.end method

.method public onCreate()V
    .locals 4

    .prologue
    const/4 v3, 0x0

    .line 56
    invoke-super {p0}, Landroid/app/Service;->onCreate()V

    .line 58
    new-instance v0, Landroid/content/IntentFilter;

    const-string v1, "android.intent.action.SCREEN_OFF"

    invoke-direct {v0, v1}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    .line 59
    const-string v1, "android.intent.action.SCREEN_ON"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 60
    const-string v1, "com.android.deskclock.ALARM_ALERT"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 61
    const-string v1, "com.android.deskclock.ALARM_DONE"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 62
    const-string v1, "android.intent.action.CAMERA_BUTTON"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 63
    const-string v1, "StartLockscreenDelayed"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 64
    const-string v1, "com.teslacoilsw.widgetlocker.intent.UNLOCKED"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 65
    const-string v1, "com.teslacoilsw.widgetlocker.intent.LOCKED"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 66
    const-string v1, "com.teslacoilsw.widgetlocker.intent.HIDDEN"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 67
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/AService;->m:Landroid/content/BroadcastReceiver;

    invoke-virtual {p0, v1, v0}, Lcom/TwinBlade/PicturePassword/AService;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 69
    const-string v0, "phone"

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/AService;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 70
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/AService;->n:Landroid/telephony/PhoneStateListener;

    const/16 v2, 0x20

    invoke-virtual {v0, v1, v2}, Landroid/telephony/TelephonyManager;->listen(Landroid/telephony/PhoneStateListener;I)V

    .line 72
    sput-object p0, Lcom/TwinBlade/PicturePassword/AService;->d:Landroid/content/Context;

    .line 73
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v0

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->c:Landroid/content/SharedPreferences;

    .line 74
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->c:Landroid/content/SharedPreferences;

    invoke-interface {v0, p0}, Landroid/content/SharedPreferences;->registerOnSharedPreferenceChangeListener(Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;)V

    .line 75
    invoke-static {p0}, Lcom/TwinBlade/PicturePassword/bd;->a(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 76
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->c:Landroid/content/SharedPreferences;

    const-string v1, "LockAfterWidgetLocker"

    invoke-interface {v0, v1, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v0

    iput-boolean v0, p0, Lcom/TwinBlade/PicturePassword/AService;->h:Z

    .line 79
    :cond_0
    sput-boolean v3, Lcom/TwinBlade/PicturePassword/Utilities;->a:Z

    .line 80
    return-void
.end method

.method public onDestroy()V
    .locals 3

    .prologue
    .line 125
    :try_start_0
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->m:Landroid/content/BroadcastReceiver;

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/AService;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    .line 129
    :goto_0
    :try_start_1
    sget-object v0, Lcom/TwinBlade/PicturePassword/AService;->a:Landroid/content/BroadcastReceiver;

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/AService;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    .line 133
    :goto_1
    const-string v0, "phone"

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/AService;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 134
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/AService;->n:Landroid/telephony/PhoneStateListener;

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/telephony/TelephonyManager;->listen(Landroid/telephony/PhoneStateListener;I)V

    .line 135
    return-void

    .line 130
    :catch_0
    move-exception v0

    goto :goto_1

    .line 126
    :catch_1
    move-exception v0

    goto :goto_0
.end method

.method public onSharedPreferenceChanged(Landroid/content/SharedPreferences;Ljava/lang/String;)V
    .locals 3
    .parameter
    .parameter

    .prologue
    .line 372
    const-string v0, "ForegroundService"

    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string v0, "TransparentNotificationIcon"

    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 373
    :cond_0
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/AService;->stopSelf()V

    .line 374
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/TwinBlade/PicturePassword/AService;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 375
    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/AService;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    .line 379
    :cond_1
    :goto_0
    return-void

    .line 376
    :cond_2
    const-string v0, "LockAfterWidgetLocker"

    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    sget-object v0, Lcom/TwinBlade/PicturePassword/AService;->d:Landroid/content/Context;

    invoke-static {v0}, Lcom/TwinBlade/PicturePassword/bd;->a(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 377
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->c:Landroid/content/SharedPreferences;

    const-string v1, "LockAfterWidgetLocker"

    const/4 v2, 0x0

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v0

    iput-boolean v0, p0, Lcom/TwinBlade/PicturePassword/AService;->h:Z

    goto :goto_0
.end method

.method public onStartCommand(Landroid/content/Intent;II)I
    .locals 7
    .parameter
    .parameter
    .parameter

    .prologue
    const/4 v6, 0x0

    const/4 v5, 0x1

    .line 85
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/AService;->c:Landroid/content/SharedPreferences;

    const-string v1, "ForegroundService"

    invoke-interface {v0, v1, v5}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v0

    .line 86
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/AService;->c:Landroid/content/SharedPreferences;

    const-string v2, "TransparentNotificationIcon"

    invoke-interface {v1, v2, v6}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v1

    .line 88
    if-eqz v0, :cond_0

    .line 89
    if-eqz v1, :cond_2

    const v0, 0x7f020006

    .line 91
    :goto_0
    new-instance v1, Landroid/app/Notification;

    const-string v2, "Lockscreen Service Started"

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v3

    invoke-direct {v1, v0, v2, v3, v4}, Landroid/app/Notification;-><init>(ILjava/lang/CharSequence;J)V

    .line 92
    new-instance v0, Landroid/content/Intent;

    const-class v2, Lcom/TwinBlade/PicturePassword/Main;

    invoke-direct {v0, p0, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 93
    invoke-static {p0, v6, v0, v6}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v0

    .line 94
    const-string v2, "PicturePassword"

    .line 95
    const-string v3, "Lockscreen service is running"

    .line 94
    invoke-virtual {v1, p0, v2, v3, v0}, Landroid/app/Notification;->setLatestEventInfo(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V

    .line 96
    const/4 v0, 0x2

    invoke-virtual {p0, v0, v1}, Lcom/TwinBlade/PicturePassword/AService;->startForeground(ILandroid/app/Notification;)V

    .line 99
    :cond_0
    if-eqz p1, :cond_1

    .line 100
    invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v0

    .line 101
    if-eqz v0, :cond_1

    .line 102
    const-string v1, "OnBoot"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_3

    .line 103
    const-string v0, "on boot"

    invoke-direct {p0, v5, v0}, Lcom/TwinBlade/PicturePassword/AService;->a(ZLjava/lang/String;)V

    .line 113
    :cond_1
    :goto_1
    return v5

    .line 89
    :cond_2
    const v0, 0x7f020005

    goto :goto_0

    .line 104
    :cond_3
    const-string v1, "TaskerStart"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 105
    const-string v0, "power"

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/AService;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/os/PowerManager;

    .line 106
    invoke-virtual {v0}, Landroid/os/PowerManager;->isScreenOn()Z

    move-result v0

    if-nez v0, :cond_1

    .line 107
    const-string v0, "tasker"

    invoke-direct {p0, v5, v0}, Lcom/TwinBlade/PicturePassword/AService;->a(ZLjava/lang/String;)V

    goto :goto_1
.end method
